<?php


namespace app\user\controller;


use app\common\controller\Api;
use app\user\model\NoticeModel;

class Notice extends Base
{
    protected $noNeedLogin = '*';

    public function index()
    {
        $data = NoticeModel::order('id','DESC')
            ->field('id,notice')
            ->select();
        if(!$data){
            $this ->error('不存在公告');
        }
        $this->success('查询成功',[
            'index' => $data
        ]);
    }

}